package 实践.class_02;

import java.util.Scanner;

public class Demo_04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String [] a = sc.nextLine().split(" ");
        boolean flag = false;
        int max = 0,sum = 0;
        for (String s : a) {
            int num = Integer.parseInt(s);
            if (num == 0) {
                break;
            }
            flag = true;
            if (num > max) {
                max = num;
                sum = 1;
            }else if (num == max) {
                sum++;
            }
        }
        if (!flag) {
            System.out.println("No input");} else {
            System.out.println(max+" "+sum);
        }
    }
}
